home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 1
/
The Arsenal Files (Arsenal Computer).ISO
/
os2_app
/
dc.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-01-06
|
1KB
|
43 lines
/* DC */
"@Echo off"
trace off
call RxFuncAdd 'SysFileTree', 'RexxUtil', 'SysFileTree'
ANS = 1
/*-------------------------------------------------------------------*/
DO WHILE ANS <> 0 & ANS <> ' '
'CLS'
CALL GET_DIRs
SAY ' '
SAY '---' DIRECTORY() '---'
SAY '0 EXIT'
DO J = 1 TO FULL_DIR.0
SAY J DIR.J
END
PULL ANS
IF ANS > 0 & ANS < (FULL_DIR.0 + 1)
THEN 'CD 'DIR.ANS
END
'cls'
'DIR /W | find /v "olume"'
EXIT
/*-------------------------------------------------------------------*/
GET_DIRs:
RC = SysFileTree('*.*',FULL_DIR,D)
DO I = 1 TO FULL_DIR.0
J = I + 1
PARSE UPPER VALUE FULL_DIR.I WITH . . . . DIR.J .
END
DIR.1 = '..'
FULL_DIR.0 = FULL_DIR.0 + 1
DO I = 2 TO FULL_DIR.0
PARSE VALUE DIR.I WITH A.1 '\' A.2 '\' A.3 '\' A.4 '\' A.5 '\' A.6 '\' A.7 '\' A.8 '\' A.9 '\' A.10
DO J = 1 TO 10
IF A.J <> '' THEN DIR.I = A.J
END
END
RETURN
/*-------------------------------------------------------------------*/